网络工程师Day7

您所在的位置:网站首页 telnet failed 网络工程师Day7

网络工程师Day7

2023-08-14 20:24| 来源: 网络整理| 查看: 265

网络工程师Day7–本地AAA配置 学习目标 掌握本地AAA认证授权方案的配置方法 掌握创建域的方法 掌握认证用户优先级的配置方法 拓扑图

AAA

场景

需要对企业服务器的资源访问进行控制,只有通过 认证的用户才能访问特定的资源,因此您需要在R1和R3两台路由器上配置本地AAA认证,并基于域来对用户进行管理,并配置已认证用户的权限级别

操作步骤 步骤一 实验环境准备

R1

ip add 119.84.111.1 24

R3

ip add 119.84.111.3 24 步骤二 测试R1与R3之间的连通性 步骤三 在R1上配置AAA功能 aaa authentication-scheme auth1 authentication-mode local quit authorization-scheme auth2 authorization-mode local quit

在R1上创建 huawei 并将认证方案和授权方案与域关联起来,然后创建一个用户并将用户加入到域huawei

[r1]telnet server enable Info: The Telnet server has been enabled. [r1]aaa [r1-aaa]domain huawei Info: Success to create a new domain. [r1-aaa-domain-huawei]authentication-scheme auth1 [r1-aaa-domain-huawei]authorization-scheme auth2 [r1-aaa-domain-huawei]quit [r1-aaa]local-user user1@huawei password cipher huawei123 Info: Add a new user. [r1-aaa]local-user user1@huawei service-type telnet [r1-aaa]local-user user1@huawei privilege level 0

将R1配置为Telnet服务器,认证模式配置为AAA

[r1]user-interface vty 0 4 [r1-ui-vty0-4]authentication-mode aaa

验证telnet R1时是否要经过AAA认证

telnet 119.84.111.1 Trying 119.84.111.1 ... Press CTRL+K to abort Connected to 119.84.111.1 ... Login authentication Username: Username:user1@huawei Password: Error: Failed to send authen-req. Username: Username:user1@huawei Password: Info: The max number of VTY users is 10, and the number of current VTY users on line is 1. The current login time is 2019-08-27 00:14:28. sys ^ Error: Unrecognized command found at '^' position.

可以看到用户user1@huawei Telnet R1后不能使用命令system-view进入系统视图,原因是用户操作权限配置为级别0,因此操作受限。

步骤五 在R3上配置AAA功能

在R3上配置认证方案为本地认证,授权方案为本地授权

[r3]aaa [r3-aaa]authentication-scheme auth1 [r3-aaa-authen-auth1]authentication-mode local [r3-aaa-authen-auth1]quit [r3-aaa]authorization-scheme auth2 Info: Create a new authorization scheme. [r3-aaa-author-auth2]authorization-mode local [r3-aaa-author-auth2]quit

在R3上创建域 huawei 并将认证方案和授权方案与域关联起来,然后创建一个用户并将用户加入到域Huawei。

配置同R1

步骤六 验证AAA的配置结果 dis domain name huawei Domain-name : huawei Domain-state: Active Authentication-scheme-name : auth1 Accounting-scheme-name : default Authorization-scheme-name : auth2 Service-scheme-name : - RADIUS-server-template : - HWTACACS-server-template: - User-group : - dis local-user username user1@huawei The contents of local user(s): Password : **************** State : active Service-type-mask : T Privilege level : 0 Ftp-directory : - Access-limit : - Accessed-num : 0 Idle-timeout : - User-group: -


【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3